﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace NavmeshPathfinding
{
    class Config
    {
        public static class Camera
        {
            public static float FOV_ANGLE = 1.0f;
            public static float FOV_NP = 0.1f;
            public static float FOV_FP = 1000.0f;

            public static float DEFAULT_VIEW_DIST = 2.0f;
            public static float DEFAULT_VIEW_ANGLE_THETA = Mathf.PI / 2;
            public static float DEFAULT_VIEW_ANGLE_GAMMA = Mathf.PI / 4;

            public static float ANGLE_THETA_MAX = 100000 * Mathf.PI;
            public static float ANGLE_THETA_MIN = -100000 * Mathf.PI;

            public static float ANGLE_GAMMA_MAX = Mathf.PI / 2 - 0.1f;
            public static float ANGLE_GAMMA_MIN = 0;

            public static float VIEW_DISTANCE_MAX = 10000.0f;
            public static float VIEW_DISTANCE_MIN = 0.1f;

            public static float ANGLE_SENSITIVITY = Mathf.PI / 256.0f;
            public static float ZOOM_SENSITIVITY = 0.003f;
            public static float PAN_SENSITIVITY = 0.01f;
        }

        public static class Interaction
        {
            public static int CLICK_TIMESPAN = 200;
            public static int DOUBLECLICK_TIMESPAN = 200;

            public static Vector2 INFO_POS = new Vector2(10, 10);
            public static Vector2 LINE_DIFFERENCE = new Vector2(0, 20);

            public static int INFO_CHECK_PERIOD = 300;
        }

        public static class Light
        {
            public static Vector3 AMBIENT_COLOR = new Vector3(0.2f, 0.2f, 0.2f);
        }

        public static class Agent
        {
            public static int COUNT = 1;

            public static float TERMINAL_SPEED = 2.0f;
            public static float DEFAULT_ACCELERATION = 2.0f;
            public static float FLOATING_ANIMATION_HEIGHT = 0.1f;
            public static float FLOATING_ANIMATION_FREQ = 2 * Mathf.PI / 1500;
            public static float TARGET_PROXIMITY = 0.01f;
            public static float SELECTION_RADIUS = 0.2f;
            public static Color SELECTION_COLOR = new Color(251, 223, 159);

            public static float DIAMETER = 1.0f;

            public static float ANIMATION_TILT_PERIOD = Mathf.PI / 10 / Config.Agent.TERMINAL_SPEED;

            public static float EDGE_WIDTH = 0.1f;
        }

        public static class Navmesh
        {
            public static char[] NVM_FORMAT_DELIMITER = new char[] { ' ', '\t' };
            public static Color NAVMESH_COLOR = new Color(186, 240, 170);
            public static Color NAVMESH_LINE_COLOR = new Color(96, 224, 10);
            public static Color PREDICTED_PATH_COLOR = new Color(255, 201, 14);
            public static Color ACTUAL_PATH_COLOR = new Color(112, 146, 190);
            public static float ACTUAL_PATH_WIDTH = 0.014f;
            public static int ACTUAL_PATH_CHECK_PERIOD = 100;
            public static int ACTUAL_PATH_LINE_MAX_COUNT = 50;
            public static float PREDICTED_PATH_WIDTH = 0.018f;
            public static float PREDICTED_PATH_ARROW_WIDTH = 0.07f;
            public static float PREDICTED_PATH_ARROW_LENGTH = 0.14f;
            public static Vector3 PATH_OFFSET = new Vector3(0.0f, 0.01f, 0.0f);

            public static float REACTION_BOUNDARY_LENGTH = 0.3f;
            public static float REACTION_BOUNDARY_WIDTH = 0.7f;
        }

        public static class Shape
        {
            public static float DELTA_RADIAN = Mathf.PI / 10;
        }
    }
}
